-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cron jobs #1155
feat: cron jobs #1155
Conversation
f4c3171
to
0f50c28
Compare
Mind breaking this up into multiple PRs? Schema changes could be one, for example. |
Database changes could be another, and so on. |
Built a cron implementation which will be used as part of our cron jobs feature (See: #1155) Splitting this off into this smaller PR to make things easier.
Previously a deepcopy involving nil pointers would end up with a pointer to a zero value. Needed as part of #1155
277571f
to
ac3efcf
Compare
b174655
to
2716ff7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome @matt2e.
start := s.clock.Now().UTC() | ||
pattern, err := cron.Parse(stale.Schedule) | ||
if err != nil { | ||
logger.Errorf(err, "Could not kill stale cron job %q because schedule could not be parsed: %q", stale.Key, stale.Schedule) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - all of these log messages should be associated with the cron job in the events table so that the user can filter and find issues with their cron jobs.
92d1f9e
to
ec44bf4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, just a few comments. This is awesome!
37cedb2
to
d96d920
Compare
Separating into different PRs:
#1141